<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5 Transitional//EN">
<%@page import="jp.co.technotree.apl.cmd.action.Act1000Bean"%>
<%@ page pageEncoding="UTF-8" %>
<jsp:useBean id="formBean" class="jp.co.technotree.apl.cmd.action.Act1000Bean" scope="request" />

<html>
<head>

<%
String actionDate = formBean.getActionDate();

Act1000Bean.PullData[] coutei = formBean.getProcessCdPullList();
Act1000Bean.PullData[] setubi = formBean.getEquipmentCdPullList();
%>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes"/>
<link rel='stylesheet' type='text/css' href='../../common/css/action/act1000.css' >
<script language='javascript' src='../../common/js/iscroll.js'></script>
<script language='javascript' src='../../common/js/action/act1000.js'></script>

<style type="text/css">
</style>

<script language='javascript'>
//画面固定
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);

var scroll1 = null;
var scroll2 = null;

//interval
var setInter;

function onInit(){
	/* iScroll */
	scroll1 = new iScroll( 'title_list_scroller',    { desktopCompatibility:false, scrollbarColor: 'rgba(45,74,65,0.5)', move:true } );

	date = new Date();
	y = date.getFullYear();
	m = date.getMonth() + 1;
	d = date.getDate();

	if (m < 10) { m = "0" + m; }
	if (d < 10) { d = "0" + d; }

	var toDay = y + "-" + m + "-" + d;

	//今日の日付を入力
	document.getElementById("date").value = toDay;
	loadText();

	//最初はすぐ設備情報を取る以後は２秒間隔で
		//アラーム情報取得するAjax
		setInter = setInterval("loadText()",2500);

	var processObj = document.getElementById("drpProcessNo");
	var equipmentObj = document.getElementById("drpEquipmentCd");

	//ラインコードを子ノードに追加
	for(var i=0;i<processObj.options.length;i++) {
		var option = processObj.options[i];
		allProcessVal[i] = processObj.options[i].value;
		allProcessTxt[i] = processObj.options[i].text;

	}
	//設備機番を子ノードに追加
	for(var i=0;i<equipmentObj.options.length;i++) {
		var option = equipmentObj.options[i];
		allEquipmentVal[i] =  equipmentObj.options[i].value;
		allEquipmentTxt[i] =  equipmentObj.options[i].text;
	}

	var regist = document.getElementById("regist").value;
	//登録完了
	if(regist == "Y"){
		registComplete();
	}

	//生産管理板に行ってきたとき
	var lineCd =document.getElementById("drpLineNm");
	if(lineCd != null){
		lineSideDell(lineCd);
	}


}

//**************************
//AJAX 部分
//**************************
function loadText(){
	xmlHttp = new XMLHttpRequest();
	xmlHttp.onreadystatechange = checkStatus;
	xmlHttp.open("GET","../act1000/act1002",true);
	xmlHttp.send(null);
}

var newDiv="";
var cnt=0;
function checkStatus(){
	if (xmlHttp.readyState == 4 && xmlHttp.status == 200){
		var xml = xmlHttp.responseXML;
		var rootNodes = xml.getElementsByTagName("list");
		var rootNode = rootNodes[0];
		var json = JSONConvert(rootNode);
		if (json==null) {
		}else if(json.detail == "blank"){

			document.getElementById("ajaxId").innerHTML ="";
			document.getElementById("ajaxId2").innerHTML  ="";
		}else {
			var arr = json.detail.split(",");
			var arrId = json.detailId.split("*");
			var arrAlarmNaiyo = json.detailAlarm.split("*");

			//var workTime = json.workTime;
			//alert(workTime);

			//タイトルの側に表示する
			document.getElementById("ajaxId").innerHTML = "<img border='0' src='../../common/img/alert3.gif' width=35px' height='35px' style='vertical-align:top;'>"+json.item;
			var html ="";
			var str;

			//設備情報リスト
			for(var k=1;k<arr.length;k++){
				html+= "<tr>";
				html+= "	<td id='"+arrId[k]+"' ontouchstart='scroll1.setting(this);'>" + arr[k]+ "<br>"+arrAlarmNaiyo[k]+"</br></td>";
				html+= "</tr>";
			}
			document.getElementById("ajaxId2").innerHTML = html;
			//Ulタグを作成
			//newDiv += "	<ul>";
			//newDiv += "	  <li>"+json.detail + cnt +"</li>";
			//newDiv += "	</ul>";
			//document.getElementById("newId").innerHTML = newDiv;
			//作業日付を表示
			//document.getElementById("ajaxDate").innerHTML = workTime;

			 cnt++;
		}
	}
}

function JSONConvert(node){
	var type = node.nodeType;
	if ( isTextNode(node) ){
		var text = getTextValue(node);
		return text;
	}
	if ( type==1 ){
		var json = {};
		var nodeName = node.nodeName;
		var childs = node.childNodes;

		for (var i = 0; i<childs.length; i++){
			var child = childs[i];
			var obj = json[child.nodeName];

			if ( child.nodeType == 1 ){
				if ( obj ){
					var array = null;
					if ( !isArray(obj) ){
						array=[];
						array[array.length]=obj;
					}else{
						array=json[child.nodeName];
					}
					array[array.length]=JSONConvert(child);
					json[child.nodeName]=array;
				}else{
					json[child.nodeName]=JSONConvert(child);
				}
			}
		}
		return json;
	}
}

function isTextNode(node){
	if ( node.hasChildNodes() ){
		var childs = node.childNodes;
		for (var i = 0; i<childs.length; i++){
			var child = childs[i];
			if ( child.nodeType != 3 ) return false;
		}
	}
	return true;
}

function getTextValue(node){
	if ( node.hasChildNodes() ){
		var childs = node.childNodes;
		var child = childs[0];
		if ( child.nodeType == 3 ){
			return child.nodeValue;
		}
	}
	return null;
}
var Hcount=0;
var SelectCnt = 0;

//interval
var ret;
var strId;

//長押し処理
var holdClass = function(e,id){
	if(e == "touchstart"){
		//ajax止める
		clearInterval(setInter);
		clearInterval(ret);
		ret = setInterval("holdStatus();",1500);
	}else if (e=="touchend"){
		clearInterval(ret);
		//ajax起動
		loadText();
		setInter = setInterval("loadText()",2500);
	}else{
		strId = id;
	}
};

//選択されている設備情報のidの値
var curNo = 1;

function holdStatus(){
	var selected4 =document.getElementById("drpLineNm");
	var selected5 =document.getElementById("drpProcessNo");
	var selected6 =document.getElementById("drpEquipmentCd");
	var arr = strId.split(",");

	//設備情報と合うライン名を選択
	for(var i=0; i<selected4.length; i++){

		if(selected4.options[i].value == arr[0]){
			selected4.selectedIndex = i;
		}
	}

	//ライン名選択により
	lineSideDell("");

	//設備情報と合う工程NOを選択
	for(var i=0; i<selected5.length; i++){

		if(selected5.options[i].text == arr[3]){
			selected5.selectedIndex = i;
		}
	}

	//設備情報と合う設備機番を選択
	for(var i=0; i<selected6.length; i++){

		if(selected6.options[i].text == arr[2]){
			selected6.selectedIndex = i;
		}
	}
	//長押しinterValClear
	clearInterval(ret);
}
function nextPageJump(nextPage){
	mainForm = document.getElementById("main");
	document.getElementById("nextPage").value = nextPage;
	mainForm.submit();
}
//全工程コード
var allProcessVal = new Array();
var allProcessTxt =  new Array();

//全設備機番コード
var allEquipmentVal = new Array();
var allEquipmentTxt =  new Array();

//equipment全リスト情報
function equipList(){
	var processObj = document.getElementById("drpProcessNo");
	var equipmentObj = document.getElementById("drpEquipmentCd");

//全子ノード削除
	//工程コード
	for(var i= processObj.childNodes.length-1; i >= 0;i--) {
		processObj.removeChild(processObj.childNodes[i]);
	}
	//設備機番
	for(var i= equipmentObj.childNodes.length-1; i >= 0;i--) {
		equipmentObj.removeChild(equipmentObj.childNodes[i]);
	}

	//リスト追加(工程コード)
	for(var i=0; i<allProcessVal.length; i++){
		//optionのvalue属性にセット(key)
		var ele = document.createElement("option");
		ele.value = allProcessVal[i];
		//optionにセット(value)
		var str = document.createTextNode(allProcessTxt[i]);
		ele.appendChild(str);

		processObj.appendChild(ele);
	}
	//リスト追加(設備機番)
	for(var i=0; i<allEquipmentVal.length; i++){

		//optionのvalue属性にセット(key)
		var ele = document.createElement("option");
		ele.value = allEquipmentVal[i];

		//optionにセット(value)
		var str = document.createTextNode(allEquipmentTxt[i]);
		ele.appendChild(str);

		equipmentObj.appendChild(ele);
	}
}
//子ノード削除
function selectDel(Obj){
	var strObject = document.getElementById(Obj);
	for(var i= strObject.childNodes.length-1; i >= 0;i--) {
		strObject.removeChild(strObject.childNodes[i]);
	}
}

//子ノード作成
function selectIn(obj,arrVar,arrTxt){
	var strObject = document.getElementById(obj);
	for(var k=0; k < arrVar.length; k++){
		//optionのvalue属性にセット(key)
		var ele = document.createElement("option");
		ele.value = arrVar[k];
		//optionにセット(value)
		var str = document.createTextNode(arrTxt[k]);
		ele.appendChild(str);

		strObject.appendChild(ele);
	}
}

function lineSideDell(obj){  //ラインコードを選択すると「工程コード、設備機番」のデータを消込
	equipList();
	var lineObj = document.getElementById("drpLineNm");
	var processObj = document.getElementById("drpProcessNo");
	var equipmentObj = document.getElementById("drpEquipmentCd");
	processObj.value = "";
	equipmentObj.value = "";

	var lineIndex = lineObj.selectedIndex;
	//選択されたラインコード
	var lineValue =lineObj.options[lineIndex].value;
	var KeeCnt = 1;
	var delCnt = 0;

	//該当する工程コード
	var keepProcessVal = new Array();
	var keepProcessTxt =  new Array();
	//削除する工程コード
	var delProcessVal = new Array();
	var delProcessTxt =  new Array();
	//該当する設備機番
	var keepEquipmentVal = new Array();
	var keepEquipmentTxt =  new Array();
	//削除する設備機番
	var delEquipmentVal = new Array();
	var delEquipmentTxt =  new Array();

	//ラインコードに該当する工程コードを分ける
	for(var i=0;i<processObj.options.length;i++) {
		var option = processObj.options[i];
		if(lineValue == option.value){
			//最初は空白option(工程コード)
			keepProcessVal[0] = "";
			keepProcessTxt[0] = "";
			keepProcessVal[KeeCnt]  = processObj.options[i].value;
			keepProcessTxt[KeeCnt]  = processObj.options[i].text;
			//最初は空白option(設備機番)
			keepEquipmentVal[0] = "";
			keepEquipmentTxt[0] = "";
			keepEquipmentVal[KeeCnt]  = equipmentObj.options[i].value;
			keepEquipmentTxt[KeeCnt]  = equipmentObj.options[i].text;
			KeeCnt ++;
		}else{
			//工程コード
			delProcessVal[delCnt] = processObj.options[i].value;
			delProcessTxt[delCnt]  = processObj.options[i].text;
			//設備機番
			delEquipmentVal[delCnt]  = equipmentObj.options[i].value;
			delEquipmentTxt[delCnt]  = equipmentObj.options[i].text;
			delCnt ++;
		}
	}

	//子ノードを削除
	selectDel("drpProcessNo");
	selectDel("drpEquipmentCd");
	//子ノードを作成
	selectIn("drpProcessNo",keepProcessVal,keepProcessTxt);
	selectIn("drpEquipmentCd",keepEquipmentVal,keepEquipmentTxt);

}

function back(){
	document.getElementById("opBoardBtn").style.display = "none";
	document.getElementById("opBoard").style.display = "none";
	document.getElementById("opBoardButtom").style.display = "none";
	document.getElementById("opBoardTop").style.display = "none";
	document.getElementById("allbackgr").style.display = "none";
}

function reformWork1(){
	var strWorkCd1Txt= new Array();
	var strWorkNm1Val= new Array();
	strWorkCd1Txt[0] = "";
	strWorkNm1Val[0] = "";


	 <%
	 Act1000Bean.PullData[] work1NmPullList =formBean.getWorkNm1PullList();

	 for (int j=0; j < work1NmPullList.length; j++){
		 Act1000Bean.PullData  data = work1NmPullList[j];
 	%>
 		strWorkCd1Txt[<%=j+1%>] = "<%=data.value%>"
	 	strWorkNm1Val[<%=j+1%>] = "<%=data.key%>"
	<%}%>
	   //作業内容の子ノードを削除
	   selectDel("drpWorkNm1");
	   //子ノードを作成
	   selectIn("drpWorkNm1",strWorkNm1Val,strWorkCd1Txt);
}

//ロス区分選択により
function lossSideDell(lossCd){
	var strWorkCd1Txt= new Array();
	var strWorkNm1Val= new Array();
	var arrCnt=1;
	strWorkCd1Txt[0] = "";
	strWorkNm1Val[0] = "";

	//作業内容②の子ノードを削除
	selectDel("drpWorkNm2");

	 <%
		 Act1000Bean.PullData[] work1ForWork2List =formBean.getWorkNm1ForWork2List() ;
		 for (int j=0; j < work1ForWork2List.length; j++){
			 Act1000Bean.PullData  data = work1ForWork2List[j];
	 %>
	 	if(lossCd.value == "<%=data.key2%>"){
	 		strWorkCd1Txt[arrCnt] = "<%=data.value%>"
		 	strWorkNm1Val[arrCnt] = "<%=data.key%>"
		 	arrCnt++;
		//ロス区分が何も選択ない場合
	 	}else if(lossCd.value == ""){
	 		reformWork1();
	 		return;
	 	}
   <%}%>


   //作業内容①の子ノードを削除
   selectDel("drpWorkNm1");
   //子ノードを作成
   selectIn("drpWorkNm1",strWorkNm1Val,strWorkCd1Txt);



}



//ロス区分選択により(作業内容①から選択された場合)
function lossSideDell2(lossCd,workCd){
	var strWorkCd1Txt= new Array();
	var strWorkNm1Val= new Array();
	var arrCnt=1;
	strWorkCd1Txt[0] = "";
	strWorkNm1Val[0] = "";
	 <%
		 Act1000Bean.PullData[] work1ForWork2List2 =formBean.getWorkNm1ForWork2List() ;
		 for (int j=0; j < work1ForWork2List2.length; j++){
			 Act1000Bean.PullData  data = work1ForWork2List2[j];
	 %>
	 	if(lossCd == "<%=data.key2%>"){
	 		strWorkCd1Txt[arrCnt] = "<%=data.value%>"
		 	strWorkNm1Val[arrCnt] = "<%=data.key%>"
		 	arrCnt++;
		//ロス区分が何も選択ない場合
	 	}else if(lossCd.value == ""){
	 		reformWork1();
	 		return;
	 	}
   <%}%>


   //作業内容の子ノードを削除
   selectDel("drpWorkNm1");
   //子ノードを作成
   selectIn("drpWorkNm1",strWorkNm1Val,strWorkCd1Txt);

	//設備情報と合うライン名を選択
	for(var i=0; i<drpWorkNm1.length; i++){

		if(drpWorkNm1.options[i].value == workCd){
			drpWorkNm1.selectedIndex = i;
		}
	}

}


//作業内容①選択により
function Work1SideDell(workCd){

	var selIndex = workCd.selectedIndex;


	//作業内容②用
	var strWorkCd2Txt= new Array();
	var strWorkNm2Val= new Array();

	//ロス区分用
	var strLossCdTxt= new Array();
	var strLossNmVal= new Array();
	strLossCdTxt[0] = "";
	strLossNmVal[0] = "";
	var arrCnt=0;

	 if(selIndex !=""){

	 //作業内容②
	 <%
		 Act1000Bean.PullData[] work2PullList =formBean.getWorkNm2PullList() ;
		 for (int j=0; j < work2PullList.length; j++){
			 Act1000Bean.PullData  data = work2PullList[j];
	 %>
	 	if(workCd.value == "<%=data.key2%>"){
	 		strWorkCd2Txt[arrCnt] = "<%=data.value%>"
	 		strWorkNm2Val[arrCnt] = "<%=data.key%>"
		 	arrCnt++;
	 	}else if(workCd.value == ""){
	 		reformWork1();
	 	}
   <%}%>
	 //ロス区分

		 var lossCd="";
		 <%
			 Act1000Bean.PullData[] lossNmPullList =formBean.getLossForWork1List() ;
			 for (int j=0; j < lossNmPullList.length; j++){
				 Act1000Bean.PullData  data = lossNmPullList[j];
		 %>
		 	if(workCd.value == "<%=data.key2%>"){
		 		lossCd = "<%=data.key%>"

		 	}
	 <%}%>
	 	 var lossObj = document.getElementById("drpLossNm");
		 lossObj.value = lossCd;

		 lossSideDell2(lossCd,workCd.value);
	 }

	 //作業内容②の子ノードを削除
	 selectDel("drpWorkNm2");
	 //作業内容②子ノードを作成
	 selectIn("drpWorkNm2",strWorkNm2Val,strWorkCd2Txt);

}

//工程NO(onChange)
function equipSideDell(obj){
	var equipment = obj.selectedIndex;
	var processObj = document.getElementById("drpProcessNo");
	//設備機番により、工程NOが変わる
	processObj.selectedIndex = equipment;
}

//複数選択されたselectBox(workNm2)
function getMultiSelected(obj){
	var workCdMulti = document.getElementById("workCdMulti");
	var result = "";
	//作業内容②selected最大数
	var finalCnt = 5;
	var selectedCnt = 0;
	  for (var i = 0; i < obj.length; i++) {
	      if (obj.options[i].selected) {
	          result += obj.options[i].value + ",";
		      selectedCnt ++;
	      }
	  }
	  for(var j=0; j < (finalCnt-selectedCnt); j++){
		  result += " ,";
	  }
	  workCdMulti.value = result;


	  //作業内容②の個数が５個以上の場合
	  if(selectedCnt > 5){
	  	  return false;

	  }else{
		  return true;

	  }
}

//設備機番(onChange)
function processSideDell(obj){
	var process = obj.selectedIndex;
	var equipmentobj = document.getElementById("drpEquipmentCd");
	//設備機番により、工程NOが変わる
	equipmentobj.selectedIndex = process;
}

//登録ボタンを押下
function doRegist(){
	var adminKbn     = document.getElementById('adminKbn').value;
	//登録者権限チェック
	if(adminKbn == "2"){

		inputChk2();
		return;
	}
	var frm = document.getElementById("main");

	var submitType  = document.getElementById('submitType');
	submitType.value = "regist";

	var loginNm     = document.getElementById('drpLoginNm').value;
	var lineNm      = document.getElementById('drpLineNm').value;
	var processNo   = document.getElementById('drpProcessNo').value;
	var equipmentCd = document.getElementById('drpEquipmentCd').value;
	var startTime   = document.getElementById('txtStartTime').value;
	var endTime     = document.getElementById('txtEndTime').value;
	var lossNm      = document.getElementById('drpLossNm').value;
	var workNm1     = document.getElementById('drpWorkNm1').value;
	//設備txt取得
	var equipmentObj = document.getElementById('drpEquipmentCd');
	document.getElementById('equipmentNm').value = equipmentObj.options[equipmentObj.selectedIndex].text;
	//工程txt取得
	var processObj = document.getElementById('drpProcessNo');
	document.getElementById('processNm').value = processObj.options[processObj.selectedIndex].text;
	var workNm2  = document.getElementById('drpWorkNm2');
	var selectTF = getMultiSelected(workNm2);

	if(selectTF == false){
		selectMultiChk();
		return;
	}


	//空白チェック
	if(lineNm==""){
		inputChk("Line name.");
		return;
	}else if(processNo==""){
		inputChk("Process No.");
		return;
	}else if(equipmentCd==""){
		inputChk("Equipment No.");
		return;
	}else if(startTime==""){
		inputChk("Operation start time.");
		return;
	}else if(endTime==""){
		inputChk("End time.");
		return;
	}else if(lossNm==""){
		inputChk("Loss type.");
		return;
	}else if(workNm1==""){
		inputChk("method(1).");
		return;
	}else if(loginNm==""){
		inputChk("Worker name");
	}else{
		frm.submit();
	}
}

//生産管理板移動
function doSrc2000(flg){
	var submitType  = document.getElementById('submitType');
	submitType.value = "src2000";

	//backPage
	document.getElementById('backPage').value = "act1000/act1000";

	if(flg =="1"){
		document.getElementById('humanId').value = "";
		document.getElementById('lineCd').value = "";

	}


	var frm = document.getElementById("main");
	frm.submit();
}

</script>

</head>

<body onLoad="onInit()">
<div>
<form name="main" id="main" action="./act1000" method="post" class="frmMain">
<table>
	<!--HEADER TITLE START -->
	<tr style = "background-color:#e1e1e1;  font-weight: bold;  border-bottom:1px solid #e1e1e1; background: -webkit-gradient(linear, left top, left bottom, from(#e1e1e1), to(#ffffff));　 ">
		<td class ="header_tbl" style = "font-size:30px; height:90px;" width="300px" align = "center">
			<div id="lblTitle" class="headerTitle" >　Production Control Board System</div>
		</td>
		<td align = "right" id="date">
			<div id="ajaxDate" class="date2"><%=actionDate%></div>
			<input type=button name="btnInsert" onclick="doRegist();" class =button value="Registration ">　
			<input type=button name="btnResult" class="seisan" class=button value="Production control board" onclick="doSrc2000('1');">　
			<input type=button name="btnModoru" class ="button"  value ="Menu" onclick="nextPageJump('top1000');">　
		</td>
	</tr>
	<!--HEADER TITLE END -->

	<!--HEADER2 TITLE START -->
	<tr style = "background-color:#D6D7DD; width:100%; border-bottom:1px solid #aaa;">
		<td id="lblEquipment" style = "font-size:28px; text-shadow:3px 3px #666; color:#aaa;" align = "left">
		　Equipment abnormality list
		</td>
		<td id="ajaxId" style="font-size : 24px; color: #FF6633; text-shadow:2px 2px black; font-weight: bold; vertical-align:middle;">
			<!--  　 F22 hsg NO16【OP10:-0000】【14:01】【ARM001】アラム内容-->
		</td>
	</tr>
	<!--HEADER2 TITLE END -->


	<tr>
		<!--設備情報 TITLE START -->
		<td>
			<div id='title_list_wrapper' class='title_list_wrapper'>
				<div id='title_list_scroller' class='title_list_scroller'>
					<table id="ajaxId2">
					</table>
				</div>
			</div>
		</td>
		<!--設備情報 TITLE END -->

		<td class="right" >
			<table width ="100%" height="520px">
				<tr>
					<td id="lblLoginNm" align="right"  class="selTitle" >Worker name</td>
					<td align = "left" colspan = "2" >
						<select name="drpLoginNm"  id="drpLoginNm"  style="width:200px">
							<option value=''></option>
							<%
							Act1000Bean.PullData[] inputEmpPullList = formBean.getInputEmpPullList();
							for (int i = 0; inputEmpPullList != null && i < inputEmpPullList.length; i++) {
								Act1000Bean.PullData data = inputEmpPullList[i];
							%>
							<option value='<%=data.key%>' <%=data.selected%> ><%=data.value%></option>
							<%}%>
						</select>
						<input type="hidden" name="adminKbn" id="adminKbn" value="<%=formBean.getAdminKbn()%>">
					</td>
					<td>

					</td>
				</tr>

				<tr>
					<td id ="lblLineNm" align="right"  class="selTitle">Line name</td>
					<td align = "left"  >
						<select name="drpLineNm"  id="drpLineNm"  style="width:200px" onChange="lineSideDell('drpLineNm');">
							<option value=''></option>
							<%
							Act1000Bean.PullData[] lineCdPullList = formBean.getLineCdPullList();
							for (int i = 0; lineCdPullList != null && i < lineCdPullList.length; i++) {
								Act1000Bean.PullData data = lineCdPullList[i];
							%>
							<option value='<%=data.key%>' <%=data.selected%> ><%=data.value%></option>
							<%}%>
						</select>
					</td>


					<td id ="lblProcessNo" align="right"   class="selTitle" >Process No</td>
					<td align = "left"  >
						<select name="drpProcessNo"  id="drpProcessNo"   style="width:200px" onTouchstart="lineChk('drpProcessNo');"  onChange="processSideDell(this);">
							<option value=''></option>
							<%
							Act1000Bean.PullData[] processCdPullList = formBean.getProcessCdPullList();
							for (int i = 0; processCdPullList != null && i < processCdPullList.length; i++) {
								Act1000Bean.PullData data = processCdPullList[i];
							%>
							<option value='<%=data.key%>' <%=data.selected%> ><%=data.value%></option>
							<%}%>
						</select>
					</td>
				</tr>
				<tr>
					<td id="lblEquipmentCd" align="right"   class="selTitle">Equipment No</td>
					<td align = "left"  >
						<select name="drpEquipmentCd"  id="drpEquipmentCd"  style="width:200px" onTouchstart="lineChk('drpEquipmentCd');" onChange="equipSideDell(this);">
							<option value=''></option>
							<%
							Act1000Bean.PullData[] equipmentCdPullList = formBean.getEquipmentCdPullList();
							for (int i = 0; equipmentCdPullList != null && i < equipmentCdPullList.length; i++) {
								Act1000Bean.PullData data = equipmentCdPullList[i];
							%>
							<option value='<%=data.key%>' <%=data.selected%> ><%=data.value%></option>
							<%}%>
						</select>
					</td>
				</tr>


				<!-- 作業開始、作業終了　START -->
				<tr>
					<td id="lblStartTime" align="right"  class="selTitle">Operation start time</td>
					<td >
						<table>
							<tr>
								<td>
									<input type="time"  class="operTime" name="txtStartTime"  id="txtStartTime" style="width: 80px; height:33px; font-size:24px; color:blue;"  value="<%=formBean.getTxtStartTime()%>">
									<input name="btnStartNow" type="button" onclick="nowTime('txtStartTime')" class="nowTime"  value="NOW" />
								</td>
								<td>

								</td>
							</tr>
						</table>
					</td>

					<td id="lblEndTime" align="right"  class="selTitle">End time</td>
					<td>
						<table>
							<tr>
								<td>
									<input type="time"  class="operTime"  name="txtEndTime" id="txtEndTime" style="width: 80px; height:33px; font-size:24px; color:blue;"  value="<%=formBean.getTxtEndTime()%>">
									<input  id="btnEndNow" type="button" onclick="nowTime('txtEndTime')" class="nowTime"  value="NOW" />
								</td>
								<td>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<!-- 作業開始、作業終了　END -->


				<!--ロス区分　START -->
				<tr>
					<td id="lblLossKbn" align="right"  class="selTitle">Loss type</td>
					<td align = "left"  >
						<select name="drpLossNm"  id="drpLossNm"  style="width:230px" onChange="lossSideDell(this);">
							<option value=''></option>
							<%
							Act1000Bean.PullData[] lossPullList = formBean.getLossPullList();
							for (int i = 0; lossPullList != null && i < lossPullList.length; i++) {
								Act1000Bean.PullData data = lossPullList[i];
							%>
							<option value='<%=data.key%>' <%=data.selected%> ><%=data.value%></option>
							<%}%>
						</select>
					</td>
				</tr>
				<tr>
					<td id="lblWorkNm1" align="right"  class="selTitle" >Operation method(1)</td>
					<td align = "left"   colspan ="1" >
						<select name="drpWorkNm1"  id="drpWorkNm1"  style="width:230px" onChange="Work1SideDell(this);">
							<option value=''></option>
							<%
							Act1000Bean.PullData[] workNm1PullList = formBean.getWorkNm1PullList();
							for (int i = 0; workNm1PullList != null && i < workNm1PullList.length; i++) {
								Act1000Bean.PullData data = workNm1PullList[i];
							%>
							<option value='<%=data.key%>' <%=data.selected%> ><%=data.value%></option>
							<%}%>
						</select>
					</td>

				<!--作業内容リスト　START -->
					<td id="lblWorkNm2" align="right"  class="selTitle">Operation method(2)</td>
					<td align = "left"   colspan ="1" >
						<select name="drpWorkNm2"  id="drpWorkNm2" multiple  style="width:180px" onTouchstart="lineChk2('drpProcessNo');">
							<option value=''></option>
							<%
							Act1000Bean.PullData[] workNm2PullList = formBean.getWorkNm2PullList();
							for (int i = 0; workNm2PullList != null && i < workNm2PullList.length; i++) {
								Act1000Bean.PullData data = workNm2PullList[i];
							%>
							<option value='<%=data.key%>' <%=data.selected%> ><%=data.value%></option>
							<%}%>
						</select>
					</td>
				</tr>
				<!--作業内容①、②　END -->


				<!-- 備考　START -->
				<tr>
					<td id="lblNote" align = "right" valign="top"  class="selTitle">Remarks(Free space)</td>
					<td colspan = "3">
						<textarea name="txtNote" style="font-size:18pt; color:blue;"rows="2" cols="40" id="txtArea" maxlength="100" ><%if(formBean.getTxtNote() == null){%><%} else{formBean.getTxtNote();}%></textarea>
					</td>
				</tr>
				<!-- 備考　END -->
			</table>
		</td>
	</tr>
</table>
<input type="hidden" id="nextPage" name="nextPage" value="">
<input type="hidden" name="submitType" id="submitType" value="">
<input type="hidden" name="equipmentNm" id="equipmentNm" value="">
<input type="hidden" name="processNm" id="processNm" value="">
<input type="hidden" name="humanId" id="humanId" value="<%=formBean.getHumanId()%>">
<input type="hidden" name="lineCd" id="lineCd" value="<%=formBean.getLineCd()%>">
<input type="hidden" name="backPage" id="backPage" value="">

<input type="hidden" name="regist" id="regist" value="<%=formBean.getRegist()%>">
<input type="hidden" name="workCdMulti" id="workCdMulti" value="">

</form>
</div>
	<div id="allbackgr" class="allbackgr" style="display:none;"></div>

	<div class="opBoardBtn" id = "opBoardBtn" style="display:none;" ></div>
	<div class="opBoardButtom" id = "opBoardButtom" style="display:none;" ></div>
	<div class="opBoardTop" id = "opBoardTop" style="display:none; font-size:22px;">　警告　</div>
	<div class="opBoard" id = "opBoard" style="display:none;"></div>

	<div class='footer' align='right'><img src='../../common/img/logo20110208.png' height='44px'></div>

</body>
</html>
